package com.smart.community.user.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.smart.community.commons.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 身份认证实体类
 * 
 * @author Wu.Liang
 * @since 2024-12-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sc_identity_verification")
public class IdentityVerification extends BaseEntity {

    /**
	 * @author Wu.Liang
	 * @date 2025年7月29日
	 */
	private static final long serialVersionUID = -4392113007890280788L;

	/** 用户ID */
    @TableField("user_id")
    private Long userId;

    /** 验证类型：1-身份证，2-人脸识别，3-指纹，4-手机号 */
    @TableField("verification_type")
    private Integer verificationType;

    /** 验证状态：0-待验证，1-验证通过，2-验证失败 */
    @TableField("verification_status")
    private Integer verificationStatus;

    /** 验证数据(JSON) */
    @TableField("verification_data")
    private String verificationData;

    /** 验证文件路径 */
    @TableField("verification_file")
    private String verificationFile;

    /** 验证时间 */
    @TableField("verification_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime verificationTime;

    /** 验证人ID */
    @TableField("verification_by")
    private Long verificationBy;

    /** 验证备注 */
    @TableField("verification_remark")
    private String verificationRemark;

    /** 验证过期时间 */
    @TableField("expire_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expireTime;

    /** 身份证正面 */
    @TableField("id_card_front")
    private String idCardFront;

    /** 身份证反面 */
    @TableField("id_card_back")
    private String idCardBack;

    /** 人脸照片 */
    @TableField("face_photo")
    private String facePhoto;

    /** OCR识别结果 */
    @TableField("ocr_result")
    private String ocrResult;

    /** 审核人ID */
    @TableField("verified_by")
    private Long verifiedBy;

    /** 审核时间 */
    @TableField("verified_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime verifiedTime;

    /** 提交时间 */
    @TableField("submit_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime submitTime;
} 